From Peaks to Valleys, Running Up and Down: Fast Permutation Pattern Matching

نویسندگان

  • Marie-Louise Bruner
  • Martin Lackner
چکیده

Permutations are fundamental objects in combinatorics. An n-permutation is a sequence containing every one of the integers 1,2, . . . ,n exactly once. Within combinatorics, patterns in permutations are an important topic. A permutation T contains a permutation P as a pattern if there exists a subsequence of T that has the same relative order of elements as P. For example 53142 contains 231 as shown by the subsequence 342. On the other hand 53142 avoids 123 since it does not contain an increasing subsequence of length 3. Pattern avoidance is related to problems in bioinformatics such as genome rearrangement, to sorting algorithms, etc., see [3]. A wealth of combinatorial results is known about pattern-avoiding permutations. However, far less is known about computational aspects. The natural problem Permutation Pattern Matching, short PPM, asks whether the pattern P is contained in T . In [1] it was shown that PPM is NP-complete. So far the brute-force algorithm is the fastest algorithm. It requires O∗(2|T |) time, i.e. the exponential runtime depends on the length of T . This result could be improved in two ways: either by reducing the constant 2 or by replacing the exponent by a smaller parameter. One possible parameter is run(T ), the number of runs in T . It describes the number of ups and downs in T . For instance 53124876 has three runs: 531 (1 is the first valley), 248 (8 is the following peak) and 76. It always holds that run(T )< |T | and on average T has 2|T |/3 runs. BODY We designed a PPM algorithm with O∗(1.8run(T )) runtime [2]. This improves both base and exponent. For T with few runs it is especially fast.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Unimodal Permutations and Almost-Increasing Cycles

In this paper, we establish a natural bijection between the almost-increasing cyclic permutations of length n and unimodal permutations of length n − 1. This map is used to give a new characterization, in terms of pattern avoidance, of almostincreasing cycles. Additionally, we use this bijection to enumerate several statistics on almost-increasing cycles. Such statistics include descents, inver...

متن کامل

A fast top-down visual attention method to accelerate template matching

This paper presents a fast top-down visual attention method to downsize the search space of template matching. Such a method first generates patterns representing the local structures, and then calculates the pattern distributions representing the template and its surroundings. From here two separate operations are performed: the "pattern weight" is first introduced, which describes how well a ...

متن کامل

Step Detection Robust against the Dynamics of Smartphones

A novel algorithm is proposed for robust step detection irrespective of step mode and device pose in smartphone usage environments. The dynamics of smartphones are decoupled into a peak-valley relationship with adaptive magnitude and temporal thresholds. For extracted peaks and valleys in the magnitude of acceleration, a step is defined as consisting of a peak and its adjacent valley. Adaptive ...

متن کامل

Discovery of an Earliest-Stage “Mystery Circle” and Development of the Structure Constructed by Pufferfish, Torquigener albomaculosus (Pisces: Tetraodontidae)

Male pufferfish (Torquigener albomaculosus) construct “mystery circles”, geometric circular structures with radially aligned peaks and valleys, on sandy seabeds for reproduction. We discovered an earliest-stage mystery circle composed of dozens of irregular depressions. The structure changed to a primitive circular form with radially aligned valleys and a circular depression in the central area...

متن کامل

Pattern-avoiding alternating words

Abstract. A word w = w1w2 · · ·wn is alternating if either w1 < w2 > w3 < w4 > · · · (when the word is up-down) or w1 > w2 < w3 > w4 < · · · (when the word is down-up). In this paper, we initiate the study of (pattern-avoiding) alternating words. We enumerate up-down (equivalently, down-up) words via finding a bijection with order ideals of a certain poset. Further, we show that the number of 1...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • TinyToCS

دوره 1  شماره 

صفحات  -

تاریخ انتشار 2012